local Lua__hushen = fk.CreateSkill {

    name = "Lua__hushen",
    
    tags = {Skill.Compulsory},
  }
  
  Fk:loadTranslationTable{
      
      ["Lua__hushen"] = "护身",
      [":Lua__hushen"] = "锁定技，你的护甲不能少于10，当你受到伤害时失去等量体力。",
  }
  
Lua__hushen:addEffect(fk.Damaged, {
    can_trigger = function(self, event, target, player, data)
      return player:hasSkill(Lua__hushen.name) and target == player and player.shield ~= 10
    end,
    on_use = function(self, event, target, player, data)
      local room = player.room
      room:changeShield(player, 10-player.shield)
    end
})

Lua__hushen:addEffect(fk.DamageInflicted, {
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(Lua__hushen.name) and target == player 
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room

    room:loseHp(player, data.damage, Lua__hushen.name)
  end
})

Lua__hushen:addAcquireEffect(function(self, player)
  player.room:changeShield(player, 10-player.shield)
end)
  
  return Lua__hushen